﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System.ComponentModel;
using ScrumTable.DL.Data.Schema;

#endregion

namespace ScrumTable.BL.DM.DataManagement
{
    /// <summary>
    /// Contains a property with the stack rank property.
    /// </summary>
    public interface IScrumItem : INotifyPropertyChanged, INotifyPropertyChanging
    {
        #region Properties
        //--------------------------------------------------------------------
        // Properties
        //--------------------------------------------------------------------

        /// <summary>
        /// Gets a dynamic mapped property with the given schema name. The
        /// specified name must be mapped by the underlying schema as a custom
        /// (additional) field mapping.
        /// </summary>
        /// <param name="name">Specifies the name of the schema entry which mapped value should be retrieved.</param>
        /// <returns>Returns the retrieved value.</returns>
        object this[string name] { get; set; }

        /// <summary>
        /// Gets the name of the current domain object. In most cases this
        /// property will contain the domain object title.
        /// </summary>
        string Name { get; set; }

        /// <summary>
        /// Returns the ranking value.
        /// </summary>
        double? Ranking { get; set; }

        /// <summary>
        /// Gets the user story description text.
        /// </summary>
        string Description { get; set; }

        /// <summary>
        /// Specifies the assigned project member.
        /// </summary>
        Member AssignedMember { get;  set; }

        /// <summary>
        /// Gets a list of all attachments associated to the current scrum
        /// item.
        /// </summary>
        DomainCollection<Attachment> Attachments { get; }

        /// <summary>
        /// Gets the parent instance of the current domain object.
        /// </summary>
        DomainBase Parent { get; }

        /// <summary>
        /// Gets the unique id of the underlying back end system identity.
        /// </summary>
        string BackEndId { get; }

        /// <summary>
        /// Gets or sets the lifecycle state of the current task.
        /// </summary>
        ScrumState State { get; set; }

        /// <summary>
        /// Returns true if the lifecycle of the current element is ready
        /// to perform additional changes.
        /// </summary>
        bool StateIsReady { get; }

        /// <summary>
        /// Gets the id of the current ScrumItem object. Its content differs
        /// from the underlying system and may contain a unique name (for AD
        /// objects) or an identification number.
        /// </summary>
        string Id { get; }

        #endregion
     
        #region Methods
        //--------------------------------------------------------------------
        // Methods
        //--------------------------------------------------------------------

        #endregion

        #region Events

        //--------------------------------------------------------------------
        // Events
        //--------------------------------------------------------------------

        #endregion
    }
}
